package com.ruoyi.project.device.device.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.device.device.mapper.BasDeviceMapper;
import com.ruoyi.project.device.device.domain.BasDevice;
import com.ruoyi.project.device.device.service.IBasDeviceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 设备保养记录Service业务层处理
 * 
 * @author wld
 * @date 2023-04-04
 */
@Service
public class BasDeviceServiceImpl implements IBasDeviceService
{
    @Autowired
    private BasDeviceMapper basDeviceMapper;

    /**
     * 查询设备保养记录
     * 
     * @param deviceId 设备保养记录主键
     * @return 设备保养记录
     */
    @Override
    public BasDevice selectBasDeviceConserveByDeviceId(String deviceId)
    {
        return basDeviceMapper.selectBasDeviceConserveByDeviceId(deviceId);
    }

    /**
     * 查询设备保养记录列表
     * 
     * @param basDeviceConserve 设备保养记录
     * @return 设备保养记录
     */
    @Override
    public List<BasDevice> selectBasDeviceConserveList(BasDevice basDeviceConserve)
    {
        return basDeviceMapper.selectBasDeviceConserveList(basDeviceConserve);
    }

    /**
     * 新增设备保养记录
     * 
     * @param basDeviceConserve 设备保养记录
     * @return 结果
     */
    @Override
    public int insertBasDeviceConserve(BasDevice basDeviceConserve)
    {
        return basDeviceMapper.insertBasDeviceConserve(basDeviceConserve);
    }

    /**
     * 修改设备保养记录
     * 
     * @param basDeviceConserve 设备保养记录
     * @return 结果
     */
    @Override
    public int updateBasDeviceConserve(BasDevice basDeviceConserve)
    {
        return basDeviceMapper.updateBasDeviceConserve(basDeviceConserve);
    }

    /**
     * 批量删除设备保养记录
     * 
     * @param deviceIds 需要删除的设备保养记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceConserveByDeviceIds(String deviceIds)
    {
        return basDeviceMapper.deleteBasDeviceConserveByDeviceIds(Convert.toStrArray(deviceIds));
    }

    /**
     * 删除设备保养记录信息
     * 
     * @param deviceId 设备保养记录主键
     * @return 结果
     */
    @Override
    public int deleteBasDeviceConserveByDeviceId(String deviceId)
    {
        return basDeviceMapper.deleteBasDeviceConserveByDeviceId(deviceId);
    }
}
